<?php

namespace app\systems\logic;
use think\facade\Db;

class OperateSystemLogic extends BasicLogic
{

    /**
     * @desc   仓库清单
     * @author zhangheng
     * @date   2024-12-11
     */
    public function add_log($params=[]){
          $admin_name = Db::name('system_admin')->where(['id'=>$params['adminId']])->value('username');
          $insert_info = [
              'admin_id'      =>$params['adminId']??'',
              'source_id'     =>$params['source_id']??'',
              'admin_name'    =>$admin_name??'',
              'title'         =>$params['title']??'',
              'operate_type'  =>$params['operate_type']??'',
              'content_before'=>$params['content_before']??'',
              'content_after' =>$params['content_after']??'',
              'create_time'   =>date('Y-m-d H:i:s',time()),
          ];
          Db::name('system_operate_log')->insert($insert_info);
          return  $this->jsonMessage(200,true,'操作成功',null);
    }


}